# -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-

# def options(opt):
#     pass

# def configure(conf):
#     conf.check_nonfatal(header_name='stdint.h', define_name='HAVE_STDINT_H')

def build(bld):
    module = bld.create_ns3_module('traffic-control', ['core', 'network'])
    module.source = [
      'model/traffic-control-layer.cc',
      'model/packet-filter.cc',
      'model/queue-disc.cc',
      'model/pfifo-fast-queue-disc.cc',
      'model/fifo-queue-disc.cc',
      'model/red-queue-disc.cc',
      'model/codel-queue-disc.cc',
      'model/fq-codel-queue-disc.cc',
      'model/pie-queue-disc.cc',
      'model/prio-queue-disc.cc',
      'model/mq-queue-disc.cc',
      'model/tbf-queue-disc.cc',
      'model/cobalt-queue-disc.cc',
      'helper/traffic-control-helper.cc',
      'helper/queue-disc-container.cc'
        ]

    module_test = bld.create_ns3_module_test_library('traffic-control')
    module_test.source = [
      'test/red-queue-disc-test-suite.cc',
      'test/codel-queue-disc-test-suite.cc',
      'test/adaptive-red-queue-disc-test-suite.cc',
      'test/pie-queue-disc-test-suite.cc',
      'test/fifo-queue-disc-test-suite.cc',
      'test/prio-queue-disc-test-suite.cc',
      'test/queue-disc-traces-test-suite.cc',
      'test/tbf-queue-disc-test-suite.cc',
      'test/tc-flow-control-test-suite.cc',
      'test/cobalt-queue-disc-test-suite.cc'
        ]

    # Tests encapsulating example programs should be listed here
    if (bld.env['ENABLE_EXAMPLES']):
        module_test.source.extend([
        #   'test/traffic-control-examples-test-suite.cc',
            ])
    
    headers = bld(features='ns3header')
    headers.module = 'traffic-control'
    headers.source = [
      'model/traffic-control-layer.h',
      'model/packet-filter.h',
      'model/queue-disc.h',
      'model/pfifo-fast-queue-disc.h',
      'model/fifo-queue-disc.h',
      'model/red-queue-disc.h',
      'model/codel-queue-disc.h',
      'model/fq-codel-queue-disc.h',
      'model/pie-queue-disc.h',
      'model/prio-queue-disc.h',
      'model/mq-queue-disc.h',
      'model/tbf-queue-disc.h',
      'model/cobalt-queue-disc.h',
      'helper/traffic-control-helper.h',
      'helper/queue-disc-container.h'
        ]

    if bld.env.ENABLE_EXAMPLES:
        bld.recurse('examples')

    bld.ns3_python_bindings()

